<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>sigsuspend</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_000_008_741">&nbsp;</a>NAME</h4><blockquote>
sigsuspend - wait for a signal
</blockquote><h4><a name = "tag_000_008_742">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;<a href="signal.h.html">signal.h</a>&gt;

int sigsuspend(const sigset_t *<i>sigmask</i>);
</code>
</pre>
</blockquote><h4><a name = "tag_000_008_743">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>sigsuspend()</i>
function replaces the current signal mask of the 
calling thread
with the set
of signals pointed
to by <i>sigmask</i> and then suspends the thread 
until
delivery of a signal whose action is either to execute a signal-catching
function or to terminate the process.
This will not cause any other signals that may have been pending on
the process to become pending on the thread.
<p>
If the action is to terminate the process then
<i>sigsuspend()</i>
will never return.  If the action is to execute a signal-catching function,
then
<i>sigsuspend()</i>
will return after the signal-catching function
returns, with the signal mask restored
to the set that existed prior to the
<i>sigsuspend()</i>
call.
<p>
It is not possible to block signals that cannot be ignored.
This is enforced by the system without causing an error to be indicated.
</blockquote><h4><a name = "tag_000_008_744">&nbsp;</a>RETURN VALUE</h4><blockquote>
Since
<i>sigsuspend()</i>
suspends process execution indefinitely, there is
no successful completion return value.
If a  return occurs, -1 is returned and
<i>errno</i>
is set to indicate the error.
</blockquote><h4><a name = "tag_000_008_745">&nbsp;</a>ERRORS</h4><blockquote>
The
<i>sigsuspend()</i>
function will fail if:
<dl compact>

<dt>[EINTR]<dd>
A signal is caught by the calling process and control is returned
from the signal-catching function.

</dl>
</blockquote><h4><a name = "tag_000_008_746">&nbsp;</a>EXAMPLES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_008_747">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
An interpretation request has been filed with IEEE PASC concerning
whether
<i>sigsuspend()</i>
suspends process execution or suspends thread execution.
The wording here matches the description of this interface specified
by the ISO&nbsp;POSIX-1 standard.
</blockquote><h4><a name = "tag_000_008_748">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_008_749">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="pause.html">pause()</a></i>,
<i><a href="sigaction.html">sigaction()</a></i>,
<i><a href="sigaddset.html">sigaddset()</a></i>,
<i><a href="sigdelset.html">sigdelset()</a></i>,
<i><a href="sigemptyset.html">sigemptyset()</a></i>,
<i><a href="sigfillset.html">sigfillset()</a></i>,
<i><a href="signal.h.html">&lt;signal.h&gt;</a></i>.
</blockquote><h4>DERIVATION</h4><blockquote>
Derived from the POSIX.1-1988 standard.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>

